import 'package:flutter_yfree/YFree.dart';

class UserModel {
  UserModel();

  String sign = "";
  String name = "";
  String avatar = "";
  String yim_user = "";
  String yim_token = "";

  UserModel.fromJson(Map<String, dynamic> map) {
    sign = map["sign"]?.toString() ?? "";
    name = map["name"]?.toString() ?? "";
    avatar = map["avatar"]?.toString() ?? "";
    yim_user = map["yim_user"]?.toString() ?? "";
    yim_token = map["yim_token"]?.toString() ?? "";
  }

  String toJson() => yToJson({
        "sign": sign,
        "name": name,
        "avatar": avatar,
        "yim_user": yim_user,
        "yim_token": yim_token,
      });
}
